﻿
namespace IceCS.DataStructure.Core.Stack
{
    /// <summary>
    /// 栈结点
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class StackNode<T>
    {
        /// <summary>
        /// 数据域
        /// </summary>
        public T Data { get; set; }

        /// <summary>
        /// 后继引用域
        /// </summary>
        public StackNode<T> Next { get; set; }

        public StackNode()
        {
            Data = default;
            Next = null;
        }

        public StackNode(T data) : this()
        {
            Data = data;
        }

        public StackNode(T data, StackNode<T> next) : this()
        {
            Data = data;
            Next = next;
        }


    }
}
